# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>

pkgname=aisleriot
pkgver=3.22.14
pkgrel=1
pkgdesc="A collection of patience games written in guile scheme"
url="https://wiki.gnome.org/Apps/Aisleriot"
arch=(x86_64)
license=(GPL)
depends=(guile gtk3 librsvg libcanberra dconf)
makedepends=(git meson yelp-tools appstream-glib)
optdepends=('pysolfc: PySol card sets'
            'pysolfc-cardsets: PySol card sets')
_commit=c8470e3f19798f11810275818a05f6a2a6e28f0c  # tags/3.22.14^0
source=("git+https://gitlab.gnome.org/GNOME/aisleriot.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
}

build() {
  arch-meson $pkgname build \
    -D theme_kde=false \
    -D theme_pysol=true \
    -D theme_pysol_path=/usr/share/PySolFC
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  DESTDIR="$pkgdir" meson install -C build
}

# vim:set sw=2 et:
